﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="/favicon.ico" >
<link rel="Shortcut Icon" href="/favicon.ico"/>
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<!--[if lt IE 9]
<script type="text/javascript" src="<%=basePath%>resources/lib/html5.js"></script>
<script type="text/javascript" src="<%=basePath%>resources/lib/respond.min.js"></script>
<script type="text/javascript" src="<%=basePath%>resources/lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="<%=basePath%>resources/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>resources/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>resources/lib/Hui-iconfont/1.0.7/iconfont.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>resources/lib/icheck/icheck.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>resources/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>resources/lib/laypage/1.2/skin/laypage.css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>订单列表</title>
</head>
<body>
<div class="page-container">
    <form action="<%=basePath%>v/getOrder" method="get" class="form form-horizontal">
        <div class="text-c">
            <input type="text" class="input-text" style="width:180px" placeholder="输入订单编号" name="orderId" value="${msg}">
            <button type="submit" class="btn btn-primary radius" name=""><i class="Hui-iconfont">&#xe665;</i> 搜订单</button>
        </div>
    </form>
	<%-- <div class="cl pd-5 bg-1 bk-gray mt-20">
		<span class="l"><a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
			<a href="javascript:;" onclick="member_add('添加订单','<%=basePath%>order/orderAdd','','510')" class="btn btn-primary radius">
				<i class="Hui-iconfont">&#xe600;</i> 添加订单
			</a>
		</span>
		<span class="r">共有数据：<strong>${orders.size()}</strong> 条</span> </div>
	<div class="mt-20"> --%>
	<table class="table table-border table-bordered table-hover table-bg table-sort">
		<thead>
			<tr class="text-c">
				<%-- <th width="25"><input type="checkbox" name="" value=""></th> --%>
				<th width="50">订单编号</th>
				<th width="30">游戏名称</th>
				<th width="60">区服</th>
				<th width="35">阵营</th>
				<th width="35">职业天赋</th>
				<th width="35">装等</th>
				<th width="150">代练内容</th>
				<%--<th width="60">发布时间</th>--%>
				<%--<th width="20">总时间</th>--%>
				<th width="50">状态</th>
			</tr>
		</thead>
		<tbody>
			<tr class="text-c">
				<%-- <td><input type="checkbox" value="${object.id}" name=""></td> --%>
				<td>${object.id}</td>
				<td>${object.gameName}</td>
				<td>${object.serviceArea}</td>
				<td>${object.camp}</td>
				<td>${object.professionalTalent}</td>
				<td>${object.install}</td>
				<td>${object.content}</td>
				<%--<td>${object.createTimeString}</td>--%>
				<%--<td>${object.allTime}</td>--%>
				<td class="td-status">
                    <c:if test="${object.type==2||object.type==3}">
                        <span class="label label-success radius">${object.typeString}</span>
                    </c:if>
                    <c:if test="${object.type==6||object.type==4}">
                        <span class="label label-warning radius">代练完成</span>
                    </c:if>
                    <c:if test="${object.type==5}">
                        <span class="label label-danger radius">${object.typeString}</span>
                    </c:if>
                </td>
			</tr>
		</tbody>
	</table>
	</div>
</div>
<script type="text/javascript" src="<%=basePath%>resources/lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>resources/lib/layer/2.1/layer.js"></script>
<script type="text/javascript" src="<%=basePath%>resources/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="<%=basePath%>resources/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=basePath%>resources/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="<%=basePath%>resources/static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="<%=basePath%>resources/static/h-ui.admin/js/H-ui.admin.js"></script>
<script type="text/javascript">
$(function(){
	$('.table-sort').dataTable({
		"aaSorting": [[ 1, "desc" ]],//默认第几个排序
		"bStateSave": true,//状态保存
		"aoColumnDefs": [
		  //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
		  {"orderable":false,"aTargets":[1]}// 制定列不参与排序
		]
	});
	$('.table-sort tbody').on( 'click', 'tr', function () {
		if ( $(this).hasClass('selected') ) {
			$(this).removeClass('selected');
		}
		else {
			table.$('tr.selected').removeClass('selected');
			$(this).addClass('selected');
		}
	});
});

/*用户-添加*/
function member_add(title,url,w,h){
	layer_show(title,url,w,h);
}
/*用户-查看*/
function member_show(title,url,id,w,h){
	layer_show(title,url,w,h);
}
/*用户-停用*/
function order_get(obj,id){
	layer.confirm('确认要申请订单吗？',function(index){
        $.ajax({
            url:"<%=basePath%>trade/addTrade",
            data:{"orderId":id},
            type:"post",
            cache: false,
            success:function (data) {
                if(data.code==0){
                    layer.msg(data.message,{icon: 6,time:2000});
                }else {
                    layer.msg(data.message,{icon: 5,time:2000});
                }
            }
        });
	});
}

/*用户-启用*/
function member_start(obj,id){
	layer.confirm('确认要启用吗？',function(index){
		$(obj).parents("tr").find(".td-manage").prepend('<a style="text-decoration:none" onClick="member_stop(this,id)" href="javascript:;" title="停用"><i class="Hui-iconfont">&#xe631;</i></a>');
		$(obj).parents("tr").find(".td-status").html('<span class="label label-success radius">已启用</span>');
		$(obj).remove();
		layer.msg('已启用!',{icon: 6,time:1000});
	});
}
/*用户-编辑*/
function order_edit(title,url,id,w,h){
	layer_show(title,url,w,h);
}
/*密码-修改*/
function change_password(title,url,id,w,h){
	layer_show(title,url,w,h);
}
/*用户-删除*/
function order_del(obj,id){
	layer.confirm('确认要删除吗？',function(index){
        $.ajax({
            url:"<%=basePath%>order/deleteOrder",
            data:{"orderId":id,"orderType":7},
            type:"post",
            cache: false,
            success:function (data) {
                if(data.code==0){
                    $(obj).parents("tr").remove();
                    layer.msg('已删除!',{icon:1,time:2000});
                }else {
                    layer.msg(data.message,{icon:5,time:2000});
                }
            }
        });
	});
}
</script>
</body>
</html>